| Filename | (eval 31)[/home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/Fatal.pm:1102] |
| Statements | Executed 6 statements in 267µs |
| Eval Invoked At | /home/hinrik/perl5/perlbrew/perls/perl-5.13.5/lib/5.13.5/Fatal.pm line 1102 |
| Sibling evals | 1, 2 |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 1 | 1 | 1 | 15µs | 40µs | Hailo::BEGIN@6.9 |
| 1 | 1 | 1 | 12µs | 39µs | Hailo::BEGIN@44 |
| 0 | 0 | 0 | 0s | 0s | Hailo::__ANON__[:83] |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | 1 | 900ns | package Hailo; require Carp; | ||
| 2 | sub (;*) { | ||||
| 3 | local($", $!) = (', ', 0); # TODO - Why do we do this? | ||||
| 4 | if (@_ == 0) { | ||||
| 5 | |||||
| 6 | 2 | 114µs | 2 | 66µs | # spent 40µs (15+26) within Hailo::BEGIN@6.9 which was called:
# once (15µs+26µs) by Fatal::_make_fatal at line 6 # spent 40µs making 1 call to Hailo::BEGIN@6.9
# spent 26µs making 1 call to warnings::unimport |
| 7 | |||||
| 8 | if (wantarray) { | ||||
| 9 | my @results = CORE::close(); | ||||
| 10 | my $retval = \@results; | ||||
| 11 | my $context = "list"; | ||||
| 12 | |||||
| 13 | |||||
| 14 | # An empty list, or a single undef is failure | ||||
| 15 | if (! @results or (@results == 1 and ! defined $results[0])) { | ||||
| 16 | |||||
| 17 | die autodie->throw( | ||||
| 18 | function => q{CORE::close}, args => [ ], | ||||
| 19 | pragma => q{autodie}, errno => $!, | ||||
| 20 | context => $context, return => $retval, | ||||
| 21 | eval_error => $@ | ||||
| 22 | ) | ||||
| 23 | ; | ||||
| 24 | } | ||||
| 25 | |||||
| 26 | return @results; | ||||
| 27 | } | ||||
| 28 | |||||
| 29 | my $retval = CORE::close(); | ||||
| 30 | my $context = "scalar"; | ||||
| 31 | |||||
| 32 | |||||
| 33 | return $retval || | ||||
| 34 | die autodie->throw( | ||||
| 35 | function => q{CORE::close}, args => [ ], | ||||
| 36 | pragma => q{autodie}, errno => $!, | ||||
| 37 | context => $context, return => $retval, | ||||
| 38 | eval_error => $@ | ||||
| 39 | ) | ||||
| 40 | ; | ||||
| 41 | |||||
| 42 | } elsif (@_ == 1) { | ||||
| 43 | |||||
| 44 | 2 | 147µs | 2 | 66µs | # spent 39µs (12+27) within Hailo::BEGIN@44 which was called:
# once (12µs+27µs) by Fatal::_make_fatal at line 44 # spent 39µs making 1 call to Hailo::BEGIN@44
# spent 27µs making 1 call to warnings::unimport |
| 45 | |||||
| 46 | if (wantarray) { | ||||
| 47 | my @results = CORE::close($_[0]); | ||||
| 48 | my $retval = \@results; | ||||
| 49 | my $context = "list"; | ||||
| 50 | |||||
| 51 | |||||
| 52 | # An empty list, or a single undef is failure | ||||
| 53 | if (! @results or (@results == 1 and ! defined $results[0])) { | ||||
| 54 | |||||
| 55 | die autodie->throw( | ||||
| 56 | function => q{CORE::close}, args => [ $_[0] ], | ||||
| 57 | pragma => q{autodie}, errno => $!, | ||||
| 58 | context => $context, return => $retval, | ||||
| 59 | eval_error => $@ | ||||
| 60 | ) | ||||
| 61 | ; | ||||
| 62 | } | ||||
| 63 | |||||
| 64 | return @results; | ||||
| 65 | } | ||||
| 66 | |||||
| 67 | my $retval = CORE::close($_[0]); | ||||
| 68 | my $context = "scalar"; | ||||
| 69 | |||||
| 70 | |||||
| 71 | return $retval || | ||||
| 72 | die autodie->throw( | ||||
| 73 | function => q{CORE::close}, args => [ $_[0] ], | ||||
| 74 | pragma => q{autodie}, errno => $!, | ||||
| 75 | context => $context, return => $retval, | ||||
| 76 | eval_error => $@ | ||||
| 77 | ) | ||||
| 78 | ; | ||||
| 79 | |||||
| 80 | |||||
| 81 | } | ||||
| 82 | die "Internal error: close(@_): Do not expect to get ", scalar(@_), " arguments"; | ||||
| 83 | } | ||||
| 84 | |||||
| 85 | 1 | 6µs | ; |